import React from 'react'

export default function StaffLists({ StyleData, title, staffData }) {
    return (
        <div className='staff-amount-container' style={StyleData}>
            <div className='staff-amount-title'>
                {title}
            </div>
            <div className="staff-amount-main">
                <div className="staff-header">
                    <div className="staff-list-title">姓名</div>
                    <div className="staff-list-title">部门</div>
                </div>
                {!staffData || (staffData.map((el, index) => {
                    return (
                        <div className="staff-list-item" key={index}>
                            <div className="item">{el.userName}</div>
                            <div className={`item ${el.department || 'danger'}`}>{el.department || "未绑定部门"}</div>
                        </div>
                    )
                }))}

            </div>
        </div>
    )
}
